package P1_2;

public class T02 {
    public static void main(String[] args) {
        animal a=new Cock();
    }

}
abstract class animal{
    private int food=18;
    public abstract void speak();
    public abstract void eat();
    public String getClassName(){
        return "animal";
    }
    public static void CanDo(){
        System.out.println("Create");
        //System.out.println(this);
    }
}
class bird extends animal{
    private int high;
    private String  food="25";
    public void setMaxHeight(){

    }
    public void speak(){
        System.out.println("叽叽叽...");
    }
    public void eat(){
        System.out.println("得得得...");
    }
    public String getClassName(){
        CanDo();
        return "bird"+food;

    }
    public String getSpuerClassName(){
        return super.getClassName();
    }
}
class Cock extends bird{
    public void speak(String bound){
        System.out.println(bound+"叽叽叽..."+bound);
    }
}
class cat extends animal{
    public void speak(){
        System.out.println("喵喵喵...");
    }
    public void eat(){
        System.out.println("啊呜啊呜...");
    }
}